export default {
  formatNum (num) {
    if (num) {
      return num.toString().replace(/\d+?(?=(?:\d{3})+$)/img, '$&,')
    }
    return num
  },
  avatar (src, size = 60) {
    src = src || '//makefriends.bs2dl.yy.com/bm1529568191772.png'
    // const isCDN = /(screenshot\.dwstatic\.com|(bs2dl|bs2)\.yy\.com)/

    // if (isCDN.test(src)) {
    //   src += `?imageview/4/0/w/${size}/h/${size}`
    // }
    return src
  }
}
